package constant;

import java.io.File;
import java.io.FileInputStream;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

public class constant {
	public static Calendar c = Calendar.getInstance();
	public static String year = Integer.toString(c.get(Calendar.YEAR)); 
	public static String basePath = constant.class.getClassLoader().getResource("/")
			.getPath().replace("WEB-INF/classes/", "");
	public static String ECNUCode = "10269";
	public static Map<String,Integer> expertNO = new HashMap<String,Integer>();
	public static Map<Integer,String> province = new HashMap<Integer,String>();
	static
	{
		
		province.put(11, "北京市");
		province.put(12, "天津市");
		province.put(13, "河北省");
		province.put(14, "山西省");
		province.put(15, "内蒙古自治区");
		province.put(21, "辽宁省");
		province.put(22, "吉林省");
		province.put(23, "黑龙江省");
		province.put(31, "上海市");
		province.put(32, "江苏省");
		province.put(33, "浙江省");
		province.put(35, "福建省");
		province.put(34, "安徽省");
		province.put(36, "江西省");
		province.put(37, "山东省");
		province.put(41, "河南省");
		province.put(42, "湖北省");
		province.put(43, "湖南省");
		province.put(44, "广东省");
		province.put(45, "广西壮族自治区");
		province.put(46, "海南省");
		province.put(50, "重庆市");
		province.put(51, "四川省");
		province.put(52, "贵州省");
		province.put(53, "云南省");
		province.put(54, "西藏自治区");
		province.put(61, "陕西省");
		province.put(62, "甘肃省");
		province.put(63, "青海省");
		province.put(64, "宁夏回族自治区");
		province.put(65, "新疆维吾尔自治区");
		province.put(71, "台湾省");
		province.put(81, "香港特别行政区");
		province.put(82, "澳门特别行政区");
	}
	static
	{
		expertNO.put("music", 3);
	}
	public static void setBasePath(String Path)
	{
		basePath = Path;
	}
	public static void main(String[] args)
	{
		System.out.println(c.getTime().toLocaleString());
	}
	private static void zip(ZipOutputStream out, File f, String base)
            throws Exception {
        System.out.println("zipping " + f.getAbsolutePath());
        if (f.isDirectory()) {
            File[] fc = f.listFiles();
            if (base != null)
                out.putNextEntry(new ZipEntry(base + "/"));
            base = base == null ? "" : base + "/";
            for (int i = 0; i < fc.length; i++) {
                zip(out, fc[i], base + fc[i].getName());
            }
        } else {
            out.putNextEntry(new ZipEntry(base));
            FileInputStream in = new FileInputStream(f);
            int b;
            while ((b = in.read()) != -1)
                out.write(b);
            in.close();
        }
    }
}
